Method and System for Lossless Coding Mode in Video Coding

ABSTRACT

A method for coding a video sequence is provided that includes encoding a portion of a picture in the video sequence in lossless coding mode, and signaling a lossless coding indicator in a compressed bit stream, wherein the lossless coding indicator corresponds to the portion of a picture and indicates whether or not the portion of the picture is losslessly coded. A method for decoding a compressed video bit stream is provided that includes determining that lossless coding mode is enabled, decoding a lossless coding indicator from the compressed video bit stream, wherein the lossless coding indicator corresponds to a portion of a picture in the compressed video bit stream and indicates whether or not the portion of the picture is losslessly coded, and decoding the portion of the picture in lossless coding mode when the lossless coding indicator indicates the portion of the picture is losslessly coded.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a division of U.S. patent application Ser. No.13/623,087, filed Sep. 19, 2012, which claims benefit of U.S.Provisional Patent Application Ser. No. 61/539,156 filed Sep. 26, 2011,U.S. Provisional Patent Application Ser. No. 61/550,990 filed Oct. 25,2011, U.S. Provisional Patent Application Ser. No. 61/554,144 filed Nov.1, 2011, and U.S. Provisional Patent Application Ser. No. 61/562,906filed Nov. 22, 2011, all of which are incorporated herein by referencein their entirety.

BACKGROUND OF THE INVENTION Field of the Invention

Embodiments of the present invention generally relate to lossless codingmode in video coding.

Description of the Related Art

The Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T WP3/16and ISO/IEC JTC 1/SC 29/WG 11 is currently developing thenext-generation video coding standard referred to as High EfficiencyVideo Coding (HEVC). Similar to previous video coding standards such asH.264/AVC, HEVC is based on a hybrid coding scheme using block-basedprediction and transform coding. First, the input signal is split intorectangular blocks that are predicted from the previously decoded databy either motion compensated (inter) prediction or intra prediction. Theresulting prediction error is coded by applying block transforms basedon an integer approximation of the discrete cosine transform, which isfollowed by quantization and entropy coding of the transformcoefficients.

The above compression process is inherently lossy. While thequantization of the transform coefficients compresses the video bytaking advantage of perceptual redundancy in the video, it inevitablyintroduces quantization errors. In some real world applications, suchlossy coding is undesirable. For example, in automotive visionapplications, video captured from cameras in a vehicle may need to betransmitted to central processors in a lossless manner for purposes ofapplying video analytics. In another example, in web collaboration andremote desktop sharing applications where hybrid natural and syntacticvideo coding might be required, part of the video scene may containsynthetic contents such as presentation slides as well as graphicalrepresentation of function keys in a user interface that need to belosslessly coded.

Early HEVC specifications such as B. Bross, et al., “WD4: Working Draft4 of High-Efficiency Video Coding,” JCTVC-F803_d6, Joint CollaborativeTeam on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IECJTC1/SC29/WG11, Torino, IT, Jul. 14-22, 2011, provide a mode forlossless coding referred to as pulse code modulation coding or I_PCM. Inthis mode, no prediction, transformation, quantization, or entropycoding is performed. Thus, there is no compression of the portions of avideo stream coded in I_PCM mode.

SUMMARY

Embodiments of the present invention relate to methods, apparatus, andcomputer readable media for lossless coding in video coding. In oneaspect, a method for coding a video sequence in a video encoder isprovided that includes encoding a portion of a picture in the videosequence in lossless coding mode, and signaling a lossless codingindicator in a compressed bit stream, wherein the lossless codingindicator corresponds to the portion of a picture and indicates whetheror not the portion of the picture is losslessly coded.

In one aspect, a method for decoding a compressed video bit stream in avideo decoder is provided that includes determining that lossless codingmode is enabled for the compressed video bit stream, decoding a losslesscoding indicator from the compressed video bit stream, wherein thelossless coding indicator corresponds to a portion of a picture in thecompressed video bit stream and indicates whether or not the portion ofthe picture is losslessly coded, and decoding the portion of the picturein lossless coding mode when the lossless coding indicator indicates theportion of the picture is losslessly coded.

According to another embodiment of the present invention, a method ofencoding video data is provided. The method comprising encoding alossless encoding flag in a picture parameter set of a video sequenceindicating regions of the video sequence may be losslessly encoded;dividing a picture using a quad-tree structure to form a plurality oflogical coding units; encoding a coding unit lossless encoding flag foreach coding unit of the picture parameter set indicating whether thecoding unit is entirely losslessly encoded; encoding a portion of apicture for each coding unit in the picture, at least one coding unit inthe picture encoded losslessly; and signaling the lossless encodingflag, the quad-tree structure, the coding unit lossless encoding flag;and the encoded portion of the picture for each coding unit.

According to another embodiment of the present invention, a method ofdecoding video data is provided. The method comprising: determining thatlossless coding flag is enabled in a picture parameter set for thecompressed video bit stream; decoding a coding unit lossless codingindicator from the compressed video bit stream, wherein the coding unitlossless coding indicator corresponds to a coding unit of quad-treestructure of a picture in the compressed video bit stream and indicateswhether or not the coding unit is entirely losslessly coded; anddecoding the coding unit in a lossless coding mode when the coding unitlossless coding indicator indicates the coding unit is losslessly coded.

BRIEF DESCRIPTION OF THE DRAWINGS

Particular embodiments will now be described, by way of example only,and with reference to the accompanying drawings:

FIG. 1 is an example of quadtree based largest coding unit (LCU)decomposition;

FIG. 2 is an example of quadtree based lossless coding signaling at theLCU level;

FIG. 3 is a block diagram of a digital system;

FIGS. 4A and 4B are block diagrams of a video encoder;

FIG. 5 is a block diagram of a video decoder;

FIG. 6 is a flow diagram of an encoding method;

FIG. 7 is a flow diagram of a decoding method; and

FIG. 8 is a block diagram of an illustrative digital system.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Specific embodiments of the invention will now be described in detailwith reference to the accompanying figures. Like elements in the variousfigures are denoted by like reference numerals for consistency.

As used herein, the term “picture” may refer to a frame or a field of aframe. A frame is a complete image captured during a known timeinterval. For convenience of description, embodiments of the inventionare described herein in reference to HEVC. One of ordinary skill in theart will understand that embodiments of the invention are not limited toHEVC.

In HEVC, a largest coding unit (LCU) is the base unit used forblock-based coding. A picture is divided into non-overlapping LCUs. Thatis, an LCU plays a similar role in coding as the macroblock ofH.264/AVC, but it may be larger, e.g., 32×32, 64×64, etc. An LCU may bepartitioned into coding units (CU). A CU is a block of pixels within anLCU and the CUs within an LCU may be of different sizes. Thepartitioning is a recursive quadtree partitioning. The quadtree is splitaccording to various criteria until a leaf is reached, which is referredto as the coding node or coding unit. The maximum hierarchical depth ofthe quadtree is determined by the size of the smallest CU (SCU)permitted. The coding node is the root node of two trees, a predictiontree and a transform tree. A prediction tree specifies the position andsize of prediction units (PU) for a coding unit. A transform treespecifies the position and size of transform units (TU) for a codingunit. A transform unit may not be larger than a coding unit and the sizeof a transform unit may be 4×4, 8×8, 16×16, and 32×32. The sizes of thetransforms units and prediction units for a CU are determined by thevideo encoder during prediction based on minimization of rate/distortioncosts. FIG. 1 shows an example of a quadtree based LCU to CU/PUdecomposition structure in which the size of the SCU is 16×16 and thesize of the LCU is 64×64.

Reference is made herein to a sequence parameter set (SPS), a pictureparameter set (PPS), an adaptation parameter set (APS), and a sliceheader. An SPS is a set of parameters signaled at the beginning of acompressed bit stream that apply by default to the decoding of theentire compressed bit stream. A PPS is a set of parameters signaled inthe compressed bit stream that apply to the decoding of one or moresubsequent pictures. An APS is also a set of parameters signaled in thecompressed bit stream that apply to the decoding of one or moresubsequent pictures. An APS is used to code picture parameters that arelikely to change from picture to picture while a PPS is used to codepicture parameters that are unlikely to change from picture to picture.A slice is a sequence LCUs in a picture that may be decodedindependently from LCUs in other slices in the picture. A slice headeris a set of parameters signaled in the compressed stream that apply to aslice.

Reference is also made herein to LCU-aligned regions and codingblock-aligned regions. An LCU-aligned region of a picture is a region inwhich the region boundaries are also LCU boundaries. It is recognizedthat the dimensions of a picture and the dimensions of an LCU may notallow a picture to be evenly divided into LCUs. There may be blocks atthe bottom of the picture or the right side of the picture that aresmaller than the actual LCU size, i.e., partial LCUs. These partial LCUsare mostly treated as if they were full LCUs and are referred to asLCUs. A coding block-aligned region of a picture is a region in whichthe region boundaries are also coding block boundaries. Coding blocksare explained in more detail herein.

Various versions of HEVC are described in the following documents, whichare incorporated by reference herein: T. Wiegand, et al., “WD3: WorkingDraft 3 of High-Efficiency Video Coding,” JCTVC-E603, JointCollaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 andISO/IEC JTC1/SC29/WG11, Geneva, CH, Mar. 16-23, 2011 (“WD3”), B. Bross,et al., “WD4: Working Draft 4 of High-Efficiency Video Coding,”JCTVC-F803_d6, Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Torino, IT, Jul. 14-22, 2011(“WD4”), B. Bross. et al., “WD5: Working Draft 5 of High-EfficiencyVideo Coding,” JCTVC-G1103_d9, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Geneva, CH, Nov.21-30, 2011 (“WD5”), B. Bross, et al., “High Efficiency Video Coding(HEVC) Text Specification Draft 6,” JCTVC-H1003, Joint CollaborativeTeam on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IECJTC1/SC29/WG1, Geneva, CH, Nov. 21-30, 2011 (“HEVC Draft 6”), B. Bross,et al., “High Efficiency Video Coding (HEVC) Text Specification Draft7,” JCTVC-I1003_d0, Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG1, Geneva, CH, Apr. 17-May 7,2012 (“HEVC Draft 7”), and B. Bross, et al., “High Efficiency VideoCoding (HEVC) Text Specification Draft 8,” JCTVC-J1003_d7, JointCollaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 andISO/IEC JTC1/SC29/WG1, Stockholm, SE, Jul. 11-20, 2012 (“HEVC Draft 8”).

Some aspects of this disclosure have been presented to the JCT-VC in M.Zhou, “AHG22: High-Level Signaling of Lossless Coding Mode in HEVC,”JCTVC-G092, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-TSG16 WP3 and ISO/IEC JTC1/SC29/WG11, Geneva, CH, Nov. 19-30, 2011, whichis incorporated by reference herein in its entirety.

As previously mentioned, HEVC as described in WD4 includes a losslesscoding mode that does not provide any compression. To support the needsof real world applications having a need for lossless coding, losslesscompression should be provided and lossless coding should be supportedthat: 1) allows an entire video sequence to be coded in lossless mode,e.g., for automotive vision; 2) allows a video sequence to be codedpartially in lossless mode with the ability to switch between lossy andlossless coding at the picture level, e.g., for video conferencing andremote education; and 3) allows a picture to be coded partially inlossless mode, e.g., in video conferencing and remote education, part ofa picture may include presentation slides and/or text that should belosslessly coded while the other parts may include natural video thatmay be lossy coded. Embodiments of the invention provide for a losslesscoding mode that allows for compression. Further, embodiments providefor lossless coding at the sequence level, picture level, region level,LCU level, and/or sub-LCU level to support the above identified needsalong with techniques for signaling lossless coding at these levels inthe compressed bit stream.

As is explained in more detail herein, for lossless coding, the parts ofthe video encoding process that introduce loss, i.e., quantization,transformation, and in-loop filtering, are bypassed for those portionsof a video sequence that are losslessly coded. Thus, when losslesscoding mode is signaled to the decoder, the decoder will operate in alossless decoding mode in which inverse quantization, inversetransformation, and in-loop filtering are bypassed for those sameportions.

Example techniques for signaling lossless coding in a compressed videobit stream at the sequence, picture, region, LCU, and/or sub-LCU levelsare first described from the perspective of a decoder. The particularsymbolic names used herein for the various lossless coding parametersare for example purposes only. To inform a decoder whether or notlossless coding parameters are present in the compressed bit stream,i.e., whether or not lossless coding mode is to be enabled, a losslesscoding enabled flag, lossless_coding_enabled_flag, is included in thesequence parameter set (SPS). If this flag is set, then lossless codingparameters may be present in the bit stream at various levels;otherwise, lossless coding parameters are not present in the bit stream.

To signal that an entire video sequence is encoded in lossless codingmode, a sequence lossless coding flag, sps_lossless_coding_enabled_flag,may be included in the SPS. If this flag is enabled, any lower levelflags for lossless coding are not present in the bit stream, and theentire sequence is encoded in lossless mode. If this flag is disabled,lower level flags for lossless coding may present in the bit stream, andthe sequence may partially encoded in lossless mode. If the flag is notpresent in the bit stream, it may be inferred equal to be disabled.Table 1 shows example pseudo code illustrating the syntax of thelossless coding enabled flag and sequence lossless coding flag at thesequence level.

TABLE 1 Seq_parameter_set_rbsp( ) { ... ... lossless_coding_enabled_flag If (lossless_coding_enabled_flag)sps_lossless_coding_enabled_flag }

To signal that one or more consecutive pictures are entirely encoded inlossless mode, a picture lossless coding flag,pps_lossless_coding_enabled_flag, may be included in a PPS. If this flagis enabled, any lower level flags for lossless coding are not present inthe bit stream, and the picture or pictures referring to the PPS areencoded entirely in lossless mode. If this flag is disabled, lower levelflags for lossless coding may present in the bit stream, and thepictures may partially encoded in lossless mode. This flag may be usedwhen lossless coding is enabled and the sequence lossless coding flag isnot enabled. Table 2 shows example pseudo code illustrating the syntaxof this flag.

TABLE 2 pic_parameter_set_rbsp( ) { ... ...  If(lossless_coding_enabled_flag && !sps_loss_coding_enabled_flag)pps_lossless_coding_enabled_flag }

Sub-picture based lossless coding in the form of region based and LCUbased lossless encoding may also be signaled. A picture may include oneor more losslessly coded regions. The sizes of these regions may varyfrom picture to picture. Thus, the region based lossless coding issignaled for each picture that includes one or more losslessly codedregions. If the adaptive parameter set (APS) option is available, theregion based lossless coding of a picture may be signaled in an APS forthe picture. If the APS option is not available, the region basedlossless coding of a picture may be signaled in a PPS for the picture.The region based lossless coding signaling examples provided hereinassume that an APS option is available. One of ordinary skill in theart, having benefit of these examples, will understand embodiments inwhich the APS option is not available and the region based losslesscoding is signaled instead in a PPS.

In some embodiments, a losslessly coded region is LCU-aligned. To signalthat one or more LCU-aligned regions of a picture are encoded inlossless mode, a region lossless coding flag,aps_lossless_coding_enabled_flag, may be included in an APS followed byparameters that define the LCU-aligned regions that are losslesslyencoded. The region definition parameters may include the number oflosslessly coded regions in a picture, num_of_lossless_regions_minus1+1and, for each region, parameters defining the boundaries of the region.For example, for a rectangular region, these parameters may be thehorizontal and vertical LCU addresses of the upper-left corner of theregion, region_upper_left_corner_x[i] and region_upper_left_corner_y[i],and the horizontal and vertical size (in LCUs) of the region,region_width_minus1[i]+1 and region_height_minus1[i]+1. The regionlossless coding flag may be used when lossless coding is enabled and thepicture lossless coding flag is not enabled in the PPS. The examplepseudo code of Table 3 illustrates these APS parameters.

TABLE 3 adaptation_parameter_set_rbsp( ) { ... ... If(lossless_coding_enabled_flag) { f (!pps_lossless_coding_enabled_flag)aps_lossless_coding_enabled_flag if (aps_lossless_coding_enabled_flag) {num_of_lossless_regions_minus1 for (i = 0; i <num_of_lossless_regions_minus1 + 1; i++) { region_upper_left_corner_x[i]region_upper_left_corner_y[i] region_width_minus1[i]region_height_minus1[i]  } }}}

In some embodiments, the LCU-based lossless coding is at the LCU level,i.e., an entire LCU is either lossy or losslessly coded. To signal thatone or more LCUs in a picture are encoded in lossless mode, a slicelossless coding flag, slice_lossless_coding_enabled_flag, may beincluded in a slice header. This flag allows switching between losslessand lossy coding from LCU to LCU. If this flag is enabled, a 1-bitcoding flag is transmitted for each LCU to signal lossless or lossycoding for the LCU. In some embodiments, the LCU-level lossless codingflag may be transmitted immediately preceding entropy encoded residualvalues of the LCU. In some embodiments, the 1-bit coding flags for theLCUs may be grouped for a slice and transmitted following the sliceheader. The slice lossless coding flag may be used when the losslesscoding is enabled and the region lossless coding flag is not enabled inthe APS. The example pseudo code of Table 4 illustrates this parameter.

TABLE 4 slice_header( ) {  If (lossless_coding_enabled_flag &&!aps_lossless_coding_enabled_flag) slice_lossless_coding_enabled_flag }

For some applications such as hybrid nature and syntactical videocoding, signaling lossless coding down to the LCU level may not providesufficient granularity. Accordingly, in some embodiments, the regionbased lossless coding is extended to allow the regions to be alignedbased on a selected coding block size. Further, the LCU based losslesscoding is extended to provide lossless coding at the sub-LCU level,i.e., lossless coding of blocks of a selected coding block size withinan LCU.

TABLE 5 lossless_coding_block_size_idc Lossless coding block size ForLCU size 64 × 64 0 64 × 64 1 32 × 32 2 16 × 16 3 8 × 8 4 4 × 4 For LCUsize 32 × 32 0 32 × 32 1 16 × 16 2 8 × 8 3 4 × 4 For LCU size 16 × 16 016 × 16 1 8 × 8 2 4 × 4

Accordingly, in some embodiments, to signal that one or more codingblock-aligned regions of a picture are losslessly encoded, the regionlossless coding flag, aps_lossless_coding_enabled_flag, may be includedin an APS followed by a lossless coding block size indicator andparameters that define the coding block-aligned regions that arelosslessly encoded. The region definition parameters may include thenumber of losslessly coded regions in a picture,num_of_lossless_regions_minus1+1 and, for each region, parametersdefining the boundaries of the region. For example, for a rectangularregion, these parameters may be the horizontal and vertical coding blockaddresses of the upper-left corner of the region,region_upper_left_corner_x[i] and region_upper_left_corner_y[i], and thehorizontal and vertical size (in coding blocks) of the region,region_width_minus1[i]+1 and region_height_minus1[i]+1. The regionlossless coding flag may be used when lossless coding is enabled and thepicture lossless coding flag is not enabled in the PPS. The examplepseudo code of Table 6 illustrates these APS parameters.

TABLE 6 adaptation_parameter_set_rbsp( ) { ... ... If(lossless_coding_enabled_flag) { f (!pps_lossless_coding_flag)aps_lossless_coding_flag if (aps_lossless_coding_flag) {num_of_lossless_regions_minus1 lossless_coding_block_size_idc for (i =0; i < num_of_lossless_regions_minus1 + 1; i++) {region_upper_left_corner_x[i] region_upper_left_corner_y[i]region_width_minus1[i] region_height_minus1[i]  } }}}

Also, in some embodiments, to signal that one or more LCUs in a pictureare encoded at least partially in lossless mode, the slice losslesscoding flag, slice_lossless_coding_enabled_flag, may be included in aslice header. If this flag is enabled, a lossless coding block sizeindicator is transmitted in slice header to signal the lossless codingblock size, and, as is explained in more detail below, quadtree basedsignaling is used to signal lossless or lossy coding of each codingblock. The slice lossless coding flag may be used when lossless codingis enabled and the region lossless coding flag is not enabled in theAPS. The example pseudo code of Table 7 illustrates these parameters.

TABLE 7 Slice_header( ) {  If (lossless_coding_enabled_flag &&!aps_lossless_coding_flag)  slice_lossless_coding_flag If(slice_lossless_coding_flag) loss_coding_block_size_idc }

The signaling of which coding blocks of an LCU are lossy coded and whichare losslessly coded is quad-tree based. In some embodiments, a quadtreeis explicitly signaled for each LCU that is separate from the quadtreesignaling of the CU partitioning of the LCU. That is, split flags aretransmitted for each LCU to indicate a recursive quadtree partitioningof the LCU with a lower bound of the coding block size. The quadtreepartitioning indicated by the split flags identifies sub-blocks of theLCU that are either entirely lossy coded or entirely losslessly coded.In addition, for each sub-block of the indicated partitioning, 1-bitcoding flags are transmitted. The 1-bit coding flag indicates whether ornot the sub-block is entirely lossy coded or entirely losslessly coded.The split flags and the 1-bit coding flags for each LCU may betransmitted on an LCU by LCU basis, i.e., the split flags and 1-bitcoding flags for each LCU precede the coded LCU data in the bit stream.

This signaling is explained by way of the example of FIG. 2. In thisexample, an LCU 200 is divided into 16 coding blocks of the sizedetermined by the coding block size indicator and the shaded codingblocks are losslessly coded blocks. As there are both lossless and lossycoded coding blocks in the LCU 200, a split flag set to indicate thatthe LCU is to be split into four sub-blocks 202, 204, 206, 208 istransmitted. For purposes of this example, a split flag with a value of1 indicates splitting and that the corresponding block is coded with inmixed lossy and lossless mode, and a split flag with a value of 0indicates no splitting and that the corresponding block is entirelycoded in lossless mode or lossy mode.

In FIG. 2, the split flag values for each sub-block are shown in themiddle of the sub-block. Sub-blocks 202 and 206 include both lossy andlosslessly coded coding blocks, so split flags with a value of 1 aretransmitted to indicate that these sub-blocks are to be further divided.The sub-blocks resulting from this further partitioning are codingblocks, so no further splitting is needed and no split flags need to betransmitted for this lowest level partitioning. Sub-block 204 includeonly coding blocks that are lossy coded and sub-block 208 includes onlycoding blocks that are losslessly coded, so split flags with a value of0 are transmitted to indicate that these sub-blocks are not to befurther divided. Thus, for this example, the split flag sequence is 1 10 1 0. A series of 1-bit coding flags for the leaf nodes of thequad-tree are also transmitted to indicate whether the leaf blocks arelossy or losslessly coded. For purposes of this example, a coding flagvalue of 1 indicates lossless coding and a coding flag value of 0indicates lossy coding. In the example of FIG. 2, the transmitted codingflags are 0 0 0 1 0 0 1 1 1 1.

The split flags and 1-bit coding flags may be transmitted sequentiallysuch that the split flag sequence is followed by the coding flagsequence. Alternatively, the split flags and the 1-bit coding flags maybe interleaved in the compressed bit stream. For example, one 1-bitcoding flag can be transmitted immediately after a 0-value split flag,or four 1-bit flags can be transmitted immediately after a 1-value splitflag when the sub-block size is the lossless coding block size. In theexample of FIG. 2, for the sequential signaling format of split flagsfollowed by 1-bit coding flags, the transmitted sequence would be (1 1 01 0) (0 0 0 1, 0, 0 1 1 1, 1); for the interleaved signaling format,transmitted sequence would be 1 1 (0 0 0 1) 0 (0) 1 (0 1 1 1) 0 (1)).

In some embodiments, rather than signaling a separate quadtree forindicating lossless and lossy coding at the sub-LCU level, the LCU to CUpartitioning quadtree determined for each LCU is also used forlossless/lossy signaling. In such embodiments, the minimum losslesscoding block size (see Table 5) that may be used is restricted to beequal to the size of the smallest coding unit (SCU) and the partitioningof an LCU into CUs is done such that each CU in the final quadtreepartitioning of the LCU is either entirely lossy coded or entirelylosslessly coded. Thus, the lossless coding block size is not explicitlysignaled in the bit stream. Further, in such embodiments, the 1-bitcoding flags are interleaved with CU data on a CU by CU basis, i.e., a1-bit coding flag for each CU is transmitted in the bit streamimmediately preceding the corresponding CU.

FIG. 3 shows a block diagram of a digital system that includes a sourcedigital system 300 that transmits encoded video sequences to adestination digital system 302 via a communication channel 316. Thesource digital system 300 includes a video capture component 304, avideo encoder component 306, and a transmitter component 308. The videocapture component 304 is configured to provide a video sequence to beencoded by the video encoder component 306. The video capture component304 may be, for example, a video camera, a video archive, or a videofeed from a video content provider. In some embodiments, the videocapture component 304 may generate computer graphics as the videosequence, or a combination of live video, archived video, and/orcomputer-generated video.

The video encoder component 306 receives a video sequence from the videocapture component 304 and encodes it for transmission by the transmittercomponent 308. The video encoder component 306 receives the videosequence from the video capture component 304 as a sequence of pictures,divides the pictures into largest coding units (LCUs), and encodes thevideo data in the LCUs. The video encoder component 306 may beconfigured to perform lossless coding of video data in the videosequence at various levels and signaling of lossless coding mode in theencoded video data during the encoding process as described herein. Anembodiment of the video encoder component 306 is described in moredetail herein in reference to FIGS. 4A and 4B.

The transmitter component 308 transmits the encoded video data to thedestination digital system 302 via the communication channel 316. Thecommunication channel 316 may be any communication medium, orcombination of communication media suitable for transmission of theencoded video sequence, such as, for example, wired or wirelesscommunication media, a local area network, or a wide area network.

The destination digital system 302 includes a receiver component 310, avideo decoder component 312 and a display component 314. The receivercomponent 310 receives the encoded video data from the source digitalsystem 300 via the communication channel 316 and provides the encodedvideo data to the video decoder component 312 for decoding. The videodecoder component 312 reverses the encoding process performed by thevideo encoder component 306 to reconstruct the LCUs of the videosequence. The video decoder component 312 may be configured to performdecoding according to signaling of lossless coding at various levels inthe encoded video data from the encoder as described herein. Anembodiment of the video decoder component 312 is described in moredetail below in reference to FIG. 5.

The reconstructed video sequence is displayed on the display component314. The display component 314 may be any suitable display device suchas, for example, a plasma display, a liquid crystal display (LCD), alight emitting diode (LED) display, etc.

In some embodiments, the source digital system 300 may also include areceiver component and a video decoder component and/or the destinationdigital system 302 may include a transmitter component and a videoencoder component for transmission of video sequences both directionsfor video steaming, video broadcasting, and video telephony. Further,the video encoder component 306 and the video decoder component 312 mayperform encoding and decoding in accordance with one or more videocompression standards. The video encoder component 306 and the videodecoder component 312 may be implemented in any suitable combination ofsoftware, firmware, and hardware, such as, for example, one or moredigital signal processors (DSPs), microprocessors, discrete logic,application specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), etc.

FIGS. 4A and 4B show block diagrams of an example video encoderproviding both lossless and lossy coding of video sequences andsignaling of lossless coding in a compressed bit stream as previouslydescribed. FIG. 5 shows a block diagram of an example video decoderproviding decoding of video sequences that are lossy encoded, losslesslyencoded, or a combination thereof. Further, the video decoder isconfigured to recognize signaling of lossless coding in a compressed bitstream as previously described. For simplicity and consistency ofexplanation, the descriptions of the example video encoder and theexample video decoder below assume that the APS option is available andassume the previously described example signaling. One of ordinary skillin the art will understand that other suitable signaling may be usedthat conveys the lossless coding levels and other information needed.Further, one of ordinary skill in the art, having benefit of thisdescription, will understand embodiments in which the APS option is notavailable.

Referring now to the example video encoder of FIGS. 4A and 4B, losslesscoding mode may be an option that is enabled at the application level,e.g., if the video encoder is deployed in an application that needslossless coding. The enablement of lossless coding mode may be signaledin the SPS of a compressed video stream as previously described. Someembodiments of the video encoder may provide lossless coding at thesequence level, which may be signaled in the compressed bit stream inthe SPS as previously described. Lossless coding at the sequence levelmay be an option that is enabled at the application level. Someembodiments may provide lossless coding at the picture level, which maybe signaled in a PPS as previously described. Some embodiments mayprovide lossless coding at the LCU aligned region level and at the LCUlevel, which may be signaled, respectively, in an APS (or PPS) and sliceheader as previously described. Some embodiments may provide losslesscoding at the coding block aligned region level and at the coding blocklevel within LCUs, which may be signaled as previously described.

FIG. 4A shows a high level block diagram of the video encoder and FIG.4B shows a block diagram of the LCU processing component 442 of thevideo encoder. As shown in FIG. 4A, the video encoder includes a codingcontrol component 440, an LCU processing component 442, a losslesscoding analysis component 444, and a memory 446. The memory 446 may beinternal memory, external memory, or a combination thereof. The memorymay be used to communicate information between the various components ofthe video encoder.

An input digital video sequence is provided to the coding controlcomponent 440. The coding control component 440 sequences the variousoperations of the video encoder, i.e., the coding control component 440runs the main control loop for video encoding. For example, the codingcontrol component 440 performs processing on the input video sequencethat is to be done at the picture level, such as determining the codingtype (I, P, or B) of a picture based on a high level coding structure,e.g., IPPP, IBBP, hierarchical-B, and dividing a picture into LCUs forfurther processing.

In addition, for pipelined architectures in which multiple LCUs may beprocessed concurrently in different components of the LCU processing,the coding control component 440 controls the processing of the LCUs byvarious components of the LCU processing in a pipeline fashion. Forexample, in many embedded systems supporting video processing, there maybe one master processor and one or more slave processing modules, e.g.,hardware accelerators. The master processor operates as the codingcontrol component and runs the main control loop for video encoding, andthe slave processing modules are employed to off load certaincompute-intensive tasks of video encoding such as motion estimation,motion compensation, intra prediction mode estimation, transformationand quantization, entropy coding, and loop filtering. The slaveprocessing modules are controlled in a pipeline fashion by the masterprocessor such that the slave processing modules operate on differentLCUs of a picture at any given time. That is, the slave processingmodules are executed in parallel, each processing its respective LCUwhile data movement from one processor to another is serial.

When lossless coding is enabled at the sub-sequence level, the losslesscoding analysis component 444 determines what parts of a picture shouldbe losslessly encoded (which may be the entire picture) and providesthis information to the coding control component 440 for communicationto various components of the LCU processing component 442 as needed. Thelossless coding analysis component 444 may use any suitable techniquefor determining the portions of the picture that should be losslesslyencoded. For example, for a video conferencing application, the losslesscoding analysis component 444 may use a region of interest algorithmdesigned to determine those parts of the picture that correspond tosynthetic contents, e.g., presentation slides, which should belosslessly encoded.

The lossless coding analysis component 444 may also determine what levelof lossless coding should be used for losslessly encoding the identifiedparts of the picture. The lossless coding analysis component 444 may useany suitable technique/criteria for determining which level of losslesscoding would be best. For example, if the parts of the picture that areto be losslessly encoded cover a sufficiently large portion of thepicture, the lossless coding analysis may specify that the entirepicture is to be losslessly encoded. In some embodiments, the losslesscoding analysis component 444 may specify that one or more LCU-alignedregions in a picture should be losslessly encoded or may specify whichLCUs in a picture are to be losslessly encoded on an LCU by LCU basis.

In some embodiments, the lossless coding analysis component 444 mayspecify that one or more coding block-aligned regions in a pictureshould be losslessly encoded or may specify that one or more codingblocks within an LCU should be lossless encoded on an LCU by LCU basis.In such embodiments, to determine the lossless coding level, thelossless coding analysis component 444 may divide the picture intocoding blocks of the sizes indicated in Table 5 to find the bestcoverage of the areas to be losslessly coded. In some such embodiments,if signaling on an LCU by LCU basis is selected, the lossless codinganalysis component 444 may also determine the quadtree based signaling(previously described herein) of which coding blocks in an LCU are lossycoded and which are losslessly coded.

In some such embodiments, to better align coding blocks with thepotential CU partitioning of LCUs in a picture, the lower limit on thecoding block sizes (see Table 5) considered by the lossless codinganalysis component 444 may be the smallest coding unit (SCU) size. As isdescribed in more detail below, in such embodiments, there is no needfor the lossless coding analysis component 444 to determine separatequadtree based signaling of lossless/lossy coding of coding blocks ifsignaling on an LCU by LCU basis is selected. Instead, as is explainedin more detail below, the LCU to CU partitioning of an LCU determinedduring the encoding process is used for signaling of lossy/losslesscoding of CUs.

When lossless coding mode is enabled, the coding control component 440communicates the results of the analysis performed by the losslesscoding analysis component 444 to various components of the LCUprocessing component 442 as needed. For example, when lossless codingmode is enabled, the coding control component 440 may communicate to theentropy coding component 436 (see FIG. 4B) that a lossless codingenabled flag indicating that lossless coding mode is enabled is to beincluded in the SPS of the video sequence. Similarly, if the entirevideo sequence is to be losslessly encoded, the coding control component440 may communicate to the entropy coding component 436 that a sequencelossless coding flag indicating that the entire sequence is losslesslycoded is to be included in the SPS of the video sequence. The codingcontrol component 440 may also set flags in memory 446 to indicate theseconditions to the various components of the LCU processing component442.

If the lossless coding analysis component 444 indicates that an entirepicture is to be losslessly coded, the coding control component 440 maycommunicate to the entropy coding component 436 that a picture losslesscoding flag indicating that the entire picture is losslessly coded is tobe included in a PPS for that picture. The coding control component 440may also communicate this condition via memory 446 to the variouscomponents of the LCU processing component 442. For example, the codingcontrol component 440 may maintain a coding bit map in memory 446 thatmay be used to indicate to the LCU processing component 440 on an LCU byLCU basis whether an LCU is to be lossy or losslessly coded. If anentire picture is to be losslessly coded, all bits in the map would beset to indicate lossless coding.

In embodiments in which the lossless coding analysis component 444 mayspecify that one or more LCU-aligned regions in a picture should belosslessly encoded or may specify which LCUs in a picture are to belosslessly encoded on an LCU by LCU basis, the coding control component440 may communicate to the entropy coding component 436 that thepreviously described parameters for these conditions are to be includedin, respectively, an APS for the picture or slice header(s) within thatpicture. The coding control component 440 may also communicate thisinformation via memory 446 to the various components of the LCUprocessing component 442. For example, the coding control component 440may set the previously mentioned coding bit map to indicate the LCUsthat are to be losslessly coded.

In embodiments in which the lossless coding analysis component 444 mayspecify that one or more coding block-aligned regions in a pictureshould be losslessly encoded or may specify which coding blocks in anLCU are to be losslessly encoded on an LCU by LCU basis, the codingcontrol component 440 may communicate to the entropy coding component436 that the previously described parameters for these conditions are tobe included in, respectively, an APS for the picture or slice header(s)within that picture. The coding control component 440 may alsocommunicate this information via memory 446 to the various components ofthe LCU processing component 442. For example, the coding controlcomponent 440 may set the previously mentioned coding bit map toindicate which LCUs contain coding blocks to be losslessly coded andwhich are to be lossy coded. The coding control component 440 may alsohave LCU level coding bit maps to indicate which coding blocks within anLCU are to be losslessly coded and which are to be lossy coded.

In embodiments in which the LCU to CU partitioning of an LCU determinedduring encoding is to be used to signal lossy/lossless coding status,the coding control component 440 may communicate to the entropy codingcomponent 436 (after the LCU to CU partitioning is determined) the 1-bitflags for signaling the lossy/lossless coding status of each CU that areto be interleaved with the CUs in the bit stream.

FIG. 4B shows a block diagram of the LCU processing component 442. TheLCU processing receives LCUs 400 of the input video sequence from thecoding control component 440 and encodes the LCUs 400 under the controlof the coding control component to generate the compressed video stream.The LCUs 400 in each picture are processed in row order. The LCUprocessing component 442 is configured such that the components thatintroduce coding loss may be bypassed as needed to provide losslesscoding at the level indicated by the coding control component 440. Morespecifically, as indicated in FIG. 4B, the transform component (DCT) 404and the quantize component (Q) 406 may be bypassed. Further, the inversequantize component (IQ) 412 and the inverse transform component 414(IDCT) may be bypassed as transformation and quantization are notperformed. In addition, the in-loop filtering components 430, 432, 434may be bypassed as the filtering is performed to compensate forartifacts introduced by lossy coding and may also introduce additionalcoding errors.

The LCUs 400 from the coding control component 440 are provided as oneinput of a motion estimation component (ME) 420, as one input of anintra-prediction estimation component (IPE) 424, and to a positive inputof a combiner 402 (e.g., adder or subtractor or the like). Further,although not specifically shown, the prediction mode of each picture asselected by the coding control component 440 is provided to a modedecision component 428 and the entropy coding component 436.

The storage component 418 provides reference data to the motionestimation component 420 and to the motion compensation component 422.The reference data may include one or more previously encoded anddecoded pictures, i.e., reference pictures.

The motion estimation component 420 provides motion data information tothe motion compensation component 422 and the entropy coding component436. More specifically, the motion estimation component 420 performstests on CUs in an LCU based on multiple inter-prediction modes (e.g.,skip mode, merge mode, and normal or direct inter-prediction), PU sizes,and TU sizes using reference picture data from storage 418 to choose thebest CU partitioning, PU/TU partitioning, inter-prediction modes, motionvectors, etc. based on, e.g., a rate distortion coding cost. To performthe tests, the motion estimation component 420 may divide an LCU intoCUs according to the maximum hierarchical depth of the quadtree, anddivide each CU into PUs according to the unit sizes of theinter-prediction modes and into TUs according to the transform unitsizes, and calculate the coding costs for each PU size, prediction mode,and transform unit size for each CU. The motion estimation component 420provides the motion vector (MV) or vectors and the prediction mode foreach PU in the selected CU partitioning to the motion compensationcomponent (MC) 422.

When the coding control component 440 indicates that a portion of an LCUis to be losslessly encoded, e.g., for coding block-aligned regions orcoding blocks specified on an LCU by LCU basis, the CU/PU/TUdecomposition of an LCU by the motion estimation component 420 includesconsideration of the coding blocks that are to be losslessly coded. Morespecifically, when a coding block-aligned region falls partially withinan LCU or if a separate quadtree is signaled for indicating lossless orlossy coding of coding blocks in an LCU, a CU can be coded partially inlossless mode and partially in lossy mode. That is, a CU may includeboth lossy coded coding blocks and losslessly coded coding blocks. Insuch embodiments, because transformation and quantization is bypassedfor lossless coded parts of a CU and is performed for lossy coded parts,the motion estimation component 420 restricts the TU partitioning of aCU such that the lossless coding area inside the CU is a multiple of aTU.

For example, if an 8×8 area inside a 16×16 CU is to be losslessly coded,the TU size for the CU is restricted to be 8×8 or smaller. In anotherexample, in a 64×64 LCU, the lossless coding analysis component 444 (seeFIG. 4A) may indicate that the bottom right 8×8 block of the LCU is tobe losslessly coded. The motion estimation component 420 may decide topartition this LCU into four 32×32 CUs such that the bottom right CUincludes the 8×8 block to be losslessly coded and the other parts of theCU are to be lossy coded. For the TU determination of the bottom rightCU, the motion estimation component 420 will restrict the TU size to be8×8.

In embodiments in which the LCU to CU partitioning quadtree for an LCUis also used for lossless/lossy signaling rather than having separatequadtrees, CUs in the final LCU to CU quadtree are not allowed toinclude both lossy and losslessly coded areas. As previously mentioned,if the LCU CU quadtree is also used to signal lossless/lossy coding, theminimum coding block is restricted to the SCU size. When the motionestimation component 420 is considering options for LCU to CUpartitioning (which are limited by the SCU size), modifications to thepartitioning are made based on cost and the lossless coding partitioningselected by the lossless coding analysis component 444. When an LCU or aCU of an LCU is split for testing, if any CU in the resulting splitincludes both lossy and losslessly coded coding blocks, the motionestimation component 420 forces a further partitioning of that CU(limited by SCU size) until a partitioning is reached in which each CUis either entirely lossy coded or entirely losslessly coded.

The motion compensation component (MC) 422 receives information from themotion estimation component 420 and generates the inter-predicted CUs.The inter-predicted CUs are provided to the mode decision component 428along with the selected inter-prediction modes for the inter-predictedPUs and corresponding TU sizes for the selected CU/PU/TU partitioning.The coding costs of the inter-predicted CUs are also provided to themode decision component 428.

The intra-prediction estimation component 424 (IPE) performsintra-prediction estimation in which tests on CUs in an LCU based onmultiple intra-prediction modes, PU sizes, and TU sizes are performedusing reconstructed data from previously encoded neighboring CUs storedin a buffer (not shown) to choose the best CU partitioning, PU/TUpartitioning, and intra-prediction modes based on a rate distortioncoding cost. To perform the tests, the intra-prediction estimationcomponent 424 may divide an LCU into CUs according to the maximumhierarchical depth of the quadtree, and divide each CU into PUsaccording to the unit sizes of the intra-prediction modes and into TUsaccording to the transform unit sizes, and calculate the coding costsfor each PU size, prediction mode, and transform unit size for each PU.The intra-prediction estimation component 424 provides the selectedintra-prediction modes for the PUs, and the corresponding TU sizes forthe selected CU partitioning to the intra-prediction component (IP) 426.The coding costs of the intra-predicted CUs are also provided to theintra-prediction component 426.

When the coding control component 440 indicates that a portion of an LCUis to be losslessly encoded, e.g., for coding block-aligned regions orcoding blocks specified on an LCU by LCU basis, the CU/PU/TUdecomposition of an LCU by the intra-prediction estimation component 424includes consideration of the coding blocks that are to be losslesslycoded. More specifically, when a coding block-aligned region fallspartially within an LCU or in embodiments in which a separate quadtreeis signaled for indicating lossless or lossy coding of coding blocks, aCU can be coded partially in lossless mode and partially in lossy mode.That is, a CU may include both lossy coded coding blocks and losslesslycoded coding blocks. In such embodiments, similar to the motionestimation component 420, the intra-prediction estimation component 424restricts the TU partitioning of a CU such that the lossless coding areainside the CU is a multiple of a TU. For example, if an 8×8 area insidea 16×16 CU is to be losslessly coded, the TU size for the CU isrestricted to be 8×8 or smaller. Since in most cases, the PU size isequal to the TU size for an intra-coded CU, the PU size for the CU isalso restricted.

In embodiments in which the LCU to CU partitioning quadtree for an LCUis also used for lossless/lossy signaling rather than having separatequadtrees, the intra-prediction estimation component 424 operates in asimilar fashion to that previously described for the motion estimationcomponent 420 to force an LCU to CU partitioning in which each CU iseither entirely lossy coded or entirely losslessly coded.

The intra-prediction component 426 (IP) receives intra-predictioninformation from the intra-prediction estimation component 424 andgenerates the intra-predicted CUs. The intra-predicted CUs are providedto the mode decision component 428 along with the selectedintra-prediction modes for the intra-predicted PUs and corresponding TUsizes for the selected CU/PU/TU partitioning.

The mode decision component 428 selects between intra-prediction of a CUand inter-prediction of a CU based on the intra-prediction coding costof the CU from the intra-prediction component 426, the inter-predictioncoding cost of the CU from the motion compensation component 422, andthe picture prediction mode provided by the coding control component440. Based on the decision as to whether a CU is to be intra- orinter-coded, the intra-predicted PUs or inter-predicted PUs areselected. The selected CU/PU/TU partitioning with corresponding modes,motion vector(s), reference picture index (indices), and predictiondirection(s) (if any) are provided to the entropy coding component 436.

The output of the mode decision component 428, i.e., the predicted PUs,is provided to a negative input of the combiner 402 and to the combiner438. The associated transform unit size is also provided to thetransform component 404. The combiner 402 subtracts a predicted PU fromthe original PU to provide residual PUs to the transform component 404(if not bypassed). Each resulting residual PU is a set of pixeldifference values that quantify differences between pixel values of theoriginal PU and the predicted PU. The residual blocks of all the PUs ofa CU form a residual CU block for further processing.

When lossless coding mode is not enabled, the transform component 404performs block transforms on all residual CUs to convert the residualpixel values to transform coefficients and provides the transformcoefficients to a quantize component 406. More specifically, thetransform component 404 receives the transform unit sizes for theresidual CU and applies transforms of the specified sizes to the CU togenerate transform coefficients. Further, the quantize component 406quantizes the transform coefficients based on quantization parameters(QPs) and quantization matrices provided by the coding control component440 and the transform sizes and provides the quantized transformcoefficients to the entropy coding component 436 for coding in the bitstream.

When lossless coding mode is enabled, the transform component 404 andthe quantization are bypassed for any residual CUs that are entirelylosslessly coded, and the residual values are provided to the entropycoding component 436 for coding in the bit stream. If a residual CUincludes coding blocks that are to be losslessly coded and coding blocksthat are to be lossy coded, the transform component 404 appliestransforms of the specified sizes to the areas of the residual CUcorresponding to coding blocks that are to be lossy coded and doesnothing to those areas of the residual CU that are to be losslesslycoded. As previously mentioned, TU partitioning of a CU is restrictedsuch that the lossless coding area is a multiple of a TU. Further, thequantize component 406 quantizes the transform coefficients for thoseareas that to be lossy coded and does nothing to the other area. Theresulting transform coefficients and residual value for the CU areprovided to the entropy coding component 436 for coding in the bitstream.

The entropy coding component 436 entropy encodes the relevant data,i.e., syntax elements, output by the various encoding components and thecoding control component 440 to generate the compressed video bitstream. As is well known, syntax elements are defined by a codingstandard and are encoded according to a syntactical order specified inthe coding standard. This syntactical order specifies the order in whichsyntax elements should occur in a compressed video bit stream. Inembodiments of the invention, the syntax elements and syntactical orderof HEVC are used, augmented with syntax elements for lossless codingsignaling at the different levels described herein. Among the syntaxelements that are encoded are flags indicating the CU/PU/TU partitioningof an LCU, the prediction modes for the CUs, lossless coding flags andother parameters related to lossless coding, and the quantized transformcoefficients (for lossy coding) and/or residual pixel values (forlossless coding) for the CUs. The entropy coding component 436 alsocodes relevant data such as ALF parameters, e.g., filter type, on/offflags, and filter coefficients, and SAO parameters, e.g., filter type,on/off flags, and offsets if these components are not bypassed.

The LCU processing component 442 includes an embedded decoder. As anycompliant decoder is expected to reconstruct an image from a compressedbit stream, the embedded decoder provides the same utility to the videoencoder. Knowledge of the reconstructed input allows the video encoderto transmit the appropriate residual energy to compose subsequentpictures.

When lossless coding mode is not enabled, the quantized transformcoefficients for each CU are provided to an inverse quantize component(IQ) 412, which outputs a reconstructed version of the transform resultfrom the transform component 404. The dequantized transform coefficientsare provided to the inverse transform component (IDCT) 414, whichoutputs estimated residual information representing a reconstructedversion of a residual CU. The inverse transform component 414 receivesthe transform unit size used to generate the transform coefficients andapplies inverse transform(s) of the specified size to the transformcoefficients to reconstruct the residual values. The reconstructedresidual CU is provided to the combiner 438.

When lossless coding mode is enabled, the inverse quantize component 412and the inverse transform component 414 are bypassed for any CUs thatare entirely losslessly coded and these residual CUs are provided to thecombiner 438. If a CU is partially lossy coded and partially losslesslycoded, the inverse quantize component 412 performs inverse quantizationon the quantized transform coefficients for the areas that are lossycoded and does nothing to the areas that are losslessly coded. Further,the inverse transform component 414 applies inverse transforms of thespecified size to the transform coefficients for the areas that arelossy coded to reconstruct the residual values and does nothing to theareas that are losslessly coded. The resulting residual CU, which willcontain both original residual values from the encoding process andreconstructed residual values, is provided to the combiner 438.

The combiner 438 adds the original predicted CU to the residual CU togenerate a reconstructed CU, which becomes part of reconstructed picturedata. The reconstructed picture data is stored in a buffer (not shown)for use by the intra-prediction estimation component 424.

Various in-loop filters may be applied to the reconstructed lossy codedpicture data to improve the quality of the reference picture data usedfor encoding/decoding of subsequent pictures. The in-loop filters mayinclude a deblocking filter 430, a sample adaptive offset filter (SAO)432, and an adaptive loop filter (ALF) 434. In some embodiments, the ALF434 may not be present. In general, the deblocking filter 430 operatesto smooth discontinuities at block boundaries, i.e., TU and CU blockboundaries, in a reconstructed picture. In general, the SAO filter 432determines the best offset values, i.e., band offset values or edgeoffset values, to be added to pixels of a reconstructed picture tocompensate for intensity shift that may have occurred during the blockbased coding of the picture and applies the offset values to thereconstructed picture. In general, the ALF 434 implements an adaptiveWiener filtering technique to minimize distortion in the reconstructedpicture as compared to the original picture.

The various in-loop filters may be applied on an LCU-by-LCU basis. Whenlossless coding is not enabled, the three in-loop filters may be appliedsequentially as shown in FIG. 4B to each reconstructed LCU. That is, thedeblocking filter 430 may be first applied to the lossy codedreconstructed data. Then, the SAO 432 may be applied to the deblockedreconstructed picture data, and the ALF 434 may be applied to the SAOfiltered reconstructed picture data. The final filtered referencepicture data is provided to the storage component 418.

When lossless coding mode is enabled, the in-loop filters 430, 432, 434are bypassed for any reconstructed LCUs that were entirely losslesslycoded, and these LCUs are provided to the storage component 418. If areconstructed LCU was partially losslessly coded and partially lossycoded, the in-loop filters 430, 432, 434 may be applied to those partsof the reconstructed LCU that were lossy coded. For application of thedeblocking filter 430 along boundary edges between lossy and losslesslycoded blocks, samples on the lossy coded block side may be filteredwhile samples on the losslessly coded block side are not filtered. Thedeblocking filter process (i.e., filter on/off decision and strong/weakfiltering) is unchanged.

Referring now to the example video decoder of FIG. 5, the video decoderis configured to bypass certain components, i.e., the inverse quantizecomponent 502, the inverse transformation component 504, and thefiltering components 516, 518, 520 based on a signaled level of losslesscoding. The video decoder operates to reverse the encoding operations,i.e., entropy coding, quantization, transformation, and prediction,performed by the video encoder of FIG. 5 to regenerate the pictures ofthe original video sequence. In view of the above description of a videoencoder, one of ordinary skill in the art will understand thefunctionality of components of the video decoder without need fordetailed explanation.

The entropy decoding component 500 receives an entropy encoded(compressed) video bit stream and reverses the entropy coding to recoverthe encoded syntax elements, e.g., CU, PU, and TU structures of LCUs,quantized transform coefficients (for lossy coding) and/or residualpixel values (for lossless coding) for CUs, motion vectors, predictionmodes, lossless coding parameters (if present), etc. The decoded syntaxelements are passed to the various components of the decoder as needed.For example, decoded prediction modes are provided to theintra-prediction component (IP) 514 or motion compensation component(MC) 510. If the decoded prediction mode is an inter-prediction mode,the entropy decoder 500 reconstructs the motion vector(s) as needed andprovides the motion vector(s) to the motion compensation component 510.

If the entropy decoding component 500 decodes a lossless coding enabledflag in the SPS of the bit stream that indicates that lossless codingmode is enabled and lossless coding parameters may be present in the bitstream, the entropy decoding component 500 manages the decoding of theencoded pictures in the bit stream according to the lossless codingparameters in the bit stream. If the sequence lossless coding flag ispresent in the SPS and enabled, the picture data for the entire sequenceis residual pixel values rather than quantized transform coefficients.According, the entropy decoding component 500 causes the inversequantize component 502 and the inverse transform component 504 to bebypassed for the entire sequence, providing the entropy decoded residualCUs directly to the addition component 506. The in-loop filteringcomponents 516, 518, 520 are also bypassed for the entire sequence.

If the entropy decoding component 500 decodes a picture lossless codingflag in a PPS indicating that one or more subsequent pictures in the bitstream are losslessly coded, the picture data for the one or morepictures is residual pixel values. Accordingly, the entropy decodingcomponent 500 causes the inverse quantize component 502 and the inversetransform component 504 to be bypassed for the one or more pictures,providing the entropy decoded residual CUs directly to the additioncomponent 506. The in-loop filtering components 516, 518, 520 are alsobypassed for the one or more pictures.

In some embodiments, LCU-aligned region based and LCU based losslesscoding may be signaled in the bit stream. As previously described,LCU-aligned region based lossless coding may be signaled in an APS andLCU based lossless coding may be signaled in a slice header. If theentropy decoding component 500 decodes a region lossless coding flag inan APS indicating that one or more LCU-aligned regions in a picture inthe bit stream are losslessly coded, the picture data for the pictureincludes residual pixel values for those LCUs in the designated regionsand quantized transform coefficients for those LCUs not in thedesignated regions. Accordingly, the entropy decoding component 500 mayuse the region definition parameters in the APS to determine which LCUsare lossy coded and which are losslessly coded. For example, the entropydecoding component 500 may construct a coding bit map based on theregion definition parameters that indicates on an LCU by LCU basiswhether an LCU is lossy or losslessly encoded.

The entropy decoding component 500 causes the inverse quantize component502 and the inverse transform component 504 to be bypassed for thelosslessly coded LCUs, providing the entropy decoded residual CUs ofthose LCUs directly to the addition component 506. The in-loop filteringcomponents 516, 518, 520 are also bypassed for these LCUs. For the lossycoded LCUs, the entropy decoding component 500 provides the entropydecoded quantized transform coefficients of the CUs to the inversequantize component 502. Also, the in-loop filtering components 516, 518,520 are not bypassed for these LCUs.

If the entropy decoding component 500 decodes a slice lossless codingflag in a slice header indicating that one or more LCUs in the slice arelosslessly coded, the picture data in the slice includes residual pixelvalues for those LCUs that are losslessly coded and quantized transformcoefficients for those LCUs that are lossy coded. Accordingly, theentropy decoding component 500 may check the 1-bit flag encoded for eachLCU in the slice to determine which LCUs are lossy coded and which arelosslessly coded. The entropy decoding component 500 causes the inversequantize component 502 and the inverse transform component 504 to bebypassed for the losslessly coded LCUs, providing the entropy decodedresidual CUs of those LCUs directly to the addition component 506. Thefiltering components 516, 518, 520 are also bypassed for these LCUs. Forthe lossy coded LCUs, the entropy decoding component 500 provides theentropy decoded quantized transform coefficients of the CUs to theinverse quantize component 502. Also, the in-loop filtering components516, 518, 520 are not bypassed for these LCUs.

In some embodiments, coding block-aligned region based and coding blockbased sub-LCU lossless coding may be signaled in the bit stream. Aspreviously described, coding block-aligned region based lossless codingmay be signaled in an APS and coding block based sub-LCU lossless codingmay be signaled in a slice header. If the entropy decoding component 500decodes a region lossless coding flag in an APS indicating that one ormore coding block-aligned regions in a picture in the bit stream arelosslessly coded, the picture data for the picture includes residualpixel values for coding blocks in the designated regions and quantizedtransform coefficients for those coding blocks not in the designatedregions. Accordingly, the entropy decoding component 500 may use theregion definition parameters and the coding block size in the APS todetermine which coding blocks are lossy coded and which are losslesslycoded. For example, the entropy decoding component 500 may construct acoding bit map based on the region definition parameters and the codingblock size that indicates on an LCU by LCU basis whether an LCU includeslosslessly coded coding blocks. The entropy decoding component 500 mayalso construct LCU level coding bit maps based on the region definitionparameters and the coding block size to indicate which coding blockswithin an LCU are losslessly coding and which are not.

The entropy decoding component 500 causes the inverse quantize component502 and the inverse transform component 504 to be bypassed for thelosslessly coded CUs of an LCU, providing the entropy decoded residualCUs of those LCUs directly to the addition component 506. The filteringcomponents 516, 518, 520 are also bypassed for these CUs. For the lossycoded CUs, the entropy decoding component 500 provides the entropydecoded quantized transform coefficients of the CUs to the inversequantize component 502. Also, the in-loop filtering components 516, 518,520 are not bypassed for these CUs.

For CUs of an LCU that are partially losslessly coded and partiallylossy coded, the entropy decoding component 500 causes the inversequantize component 502 and the inverse transform component 504 to bebypassed for the losslessly coded parts, providing the entropy decodedresidual for those parts to the addition component 506. The in-loopfiltering components 516, 518, 520 are also bypassed for the losslesslycoded parts. For the lossy coded parts, the entropy decoding component500 provides the entropy decoded quantized transform coefficients ofthese parts to the inverse quantize component 502.

In some embodiments, if the entropy decoding component 500 decodes aslice lossless coding flag in a slice header indicating that codingblock based sub-LCU lossless coding is enabled, for each LCU in theslice, the entropy decoding component 500 uses the coding block sizesignaled in the slice header and the split flags and 1-bit coding flagssignaled for the LCU to determine which coding blocks in an LCU arelossy coded and which are losslessly coded. The entropy decodingcomponent 500 causes the inverse quantize component 502 and the inversetransform component 504 to be bypassed for the losslessly coded CUs ofan LCU, providing the entropy decoded residual CUs directly to theaddition component 506. The filtering components 516, 518, 520 are alsobypassed for these CUs. For the lossy coded CUs, the entropy decodingcomponent 500 provides the entropy decoded transform coefficients of theCUs to the inverse quantize component 502. Also, the filteringcomponents 516, 518, 520 are not bypassed for these CUs.

For CUs of an LCU that are partially losslessly coded and partiallylossy coded, the entropy decoding component 500 causes the inversequantize component 502 and the inverse transform component 504 to bebypassed for the losslessly coded parts, providing the entropy decodedresidual for those parts to the addition component 506. The in-loopfiltering components 516, 518, 520 are also bypassed for the losslesslycoded parts. For the lossy coded parts, the entropy decoding component500 provides the entropy decoded quantized transform coefficients ofthese parts to the inverse quantize component 502.

In some embodiments, if the entropy decoding component 500 decodes aslice lossless coding flag in a slice header indicating that codingblock based sub-LCU lossless coding is enabled, for each LCU in theslice, the entropy decoding component 500 uses the LCU to CUpartitioning signaled for the LCU and the 1-bit coding flags signaledfor each CU in the LCU to determine which CUs in the LCU are lossy codedand which are losslessly coded. The entropy decoding component 500causes the inverse quantize component 502 and the inverse transformcomponent 504 to be bypassed for the losslessly coded CUs of an LCU,providing the entropy decoded residual CUs directly to the additioncomponent 506. The in-loop filtering components 516, 518, 520 are alsobypassed for these CUs. For the lossy coded CUs, the entropy decodingcomponent 500 provides the entropy decoded quantized transformcoefficients of the CUs to the inverse quantize component 502. Also, thein-loop filtering components 516, 518, 520 are not bypassed for theseCUs.

The inverse quantize component (IQ) 502 de-quantizes the quantizedtransform coefficients of fully or partially lossy coded CUs. Theinverse transform component 504 transforms the frequency domain datafrom the inverse quantize component 502 back to the residual CUs. Thatis, the inverse transform component 504 applies an inverse unittransform, i.e., the inverse of the unit transform used for encoding, tothe de-quantized residual coefficients to produce reconstructed residualvalues of the CUs.

A residual CU supplies one input of the addition component 506. Theother input of the addition component 506 comes from the mode switch508. When an inter-prediction mode is signaled in the encoded videostream, the mode switch 508 selects predicted PUs from the motioncompensation component 510 and when an intra-prediction mode issignaled, the mode switch selects predicted PUs from theintra-prediction component 514.

The motion compensation component 510 receives reference data from thestorage component 512 and applies the motion compensation computed bythe encoder and transmitted in the encoded video bit stream to thereference data to generate a predicted PU. That is, the motioncompensation component 510 uses the motion vector(s) from the entropydecoder 500 and the reference data to generate a predicted PU.

The intra-prediction component 514 receives reconstructed samples frompreviously reconstructed PUs of a current picture from the storagecomponent 512 and performs the intra-prediction computed by the encoderas signaled by an intra-prediction mode transmitted in the encoded videobit stream using the reconstructed samples as needed to generate apredicted PU.

The addition component 506 generates a reconstructed CU by adding thepredicted PUs selected by the mode switch 508 and the residual CU. Theoutput of the addition component 506, i.e., the reconstructed CUs, isstored in the storage component 512 for use by the intra-predictioncomponent 514.

In-loop filters may be applied to reconstructed lossy coded picture datato improve the quality of the decoded pictures and the quality of thereference picture data used for decoding of subsequent pictures. Thein-loop filters are the same as those of the encoder, i.e., a deblockingfilter 516, a sample adaptive offset filter (SAO) 518, and an adaptiveloop filter (ALF) 520. In some embodiments, the ALF 520 may not bepresent. The in-loop filters may be applied on an LCU-by-LCU basis. Whenlossless coding mode is not enabled, the three in-loop filters may beapplied sequentially as shown in FIG. 5 to each reconstructed LCU. Thatis, the deblocking filter 516 may be first applied to the lossy codedreconstructed data. Then, the SAO 518 may be applied to the deblockedreconstructed picture data, and the ALF 520 may be applied to the SAOfiltered reconstructed picture data. The final filtered LCUs are storedin the storage component 512 and are output as part of the final decodedvideo sequence.

When lossless coding mode is enabled, the in-loop filters 516, 518, 520are bypassed for any reconstructed LCUs that were entirely losslesslycoded, and the unfiltered reconstructed LCUs are stored in the storagecomponent 512 and are output as part of the final decoded videosequence. If a reconstructed LCU was partially losslessly coded andpartially lossy coded, the in-loop filters 516, 518, 520 may be appliedto those parts of the reconstructed LCU that were lossy coded. Forapplication of the deblocking filter 516 along boundary edges betweenlossy and losslessly coded blocks, samples on the lossy coded block sidemay be filtered while samples on the losslessly coded block side are notfiltered. The deblocking filter process (e.g., filter on/off decisionand strong/weak filtering) is unchanged. The partially filteredreconstructed LCUs are also stored in the storage component 512 and areoutput as part of the final decoded video sequence.

FIG. 6 is a flow diagram of an encoding method that may be performed ina video encoder, e.g., the encoder of FIGS. 4A and 4B. This method maybe performed when lossless coding mode is enabled in the video encoder.Enabling of lossless coding mode in a video encoder is previouslydescribed herein. As shown in FIG. 6, initially a lossless coding levelis determined 600 for a picture. In some embodiments, the losslesscoding level may be the picture level, the LCU-aligned region level, orthe LCU level. In some embodiments, the lossless coding level may be thepicture level, the coding block-aligned region level, or the sub-LCU(coding block) level. These levels are previously described herein. Thisdetermination may be made in any suitable way. For example, a region ofinterest algorithm may be used to determine what part or parts of thepicture should be encoded losslessly. A further analysis may beperformed to determine which of the levels is most suitable for losslessencoding of the identified part(s).

The picture is then encoded 602 according to the selected losslesscoding level. That is, the parts of the picture identified by thelossless coding level are encoded in lossless coding mode. Encoding of apicture according to the various levels is previously described herein.

The lossless coding level used in encoding the picture is also signaled604 in the compressed bit stream. Signaling of the various losslesscoding levels is previously described herein. The signaling may includelossless coding indicators that indicate whether or not portions of thepicture are losslessly encoded. For example, a picture lossless codingflag indicates whether or not a picture is losslessly encoded. Inanother example, a region lossless coding flag indicates whether or nota region (or regions) in a picture is losslessly encoded. In anotherexample, a 1-bit coding flag corresponding to a CU indicates whether ornot a CU is losslessly encoded.

FIG. 7 is a flow diagram of a decoding method that may be performed in avideo decoder, e.g., the decoder of FIG. 5. Initially, a determination700 is made that lossless coding mode is enabled. As is previouslydescribed herein, this determination may be made based on the value of alossless coding enabled flag encoded in the SPS of a compressed videobit stream.

A lossless coding indicator is decoded 702 that indicates whether or nota portion of a picture is losslessly coded. The portion of the picturemay be the entire picture, a region of the picture, an LCU in thepicture, a coding block in the picture, or a CU of an LCU in thepicture. Such lossless coding indicators are previously describedherein. The portion of the picture is then decoded 704 in losslesscoding mode if the indicator is set to indicate lossless coding mode.Decoding in lossless coding mode is previously described herein.

FIG. 8 is a block diagram of an example digital system suitable for useas an embedded system that may be configured to encode a video sequenceusing lossless coding techniques as described herein and/or to decode acompressed video bit stream generated using lossless coding techniquesas described herein. This example system-on-a-chip (SoC) isrepresentative of one of a family of DaVinci™ Digital Media Processors,available from Texas Instruments, Inc. This SoC is described in moredetail in “TMS320DM6467 Digital Media System-on-Chip”, SPRS403G,December 2007 or later, which is incorporated by reference herein.

The SoC 800 is a programmable platform designed to meet the processingneeds of applications such as video encode/decode/transcode/transrate,video surveillance, video conferencing, set-top box, medical imaging,media server, gaming, digital signage, etc. The SoC 800 provides supportfor multiple operating systems, multiple user interfaces, and highprocessing performance through the flexibility of a fully integratedmixed processor solution. The device combines multiple processing coreswith shared memory for programmable video and audio processing with ahighly-integrated peripheral set on common integrated substrate.

The dual-core architecture of the SoC 800 provides benefits of both DSPand Reduced Instruction Set Computer (RISC) technologies, incorporatinga DSP core and an ARM926EJ-S core. The ARM926EJ-S is a 32-bit RISCprocessor core that performs 32-bit or 16-bit instructions and processes32-bit, 16-bit, or 8-bit data. The DSP core is a TMS320C64x+TM core witha very-long-instruction-word (VLIW) architecture. In general, the ARM isresponsible for configuration and control of the SoC 800, including theDSP Subsystem, the video data conversion engine (VDCE), and a majorityof the peripherals and external memories. The switched central resource(SCR) is an interconnect system that provides low-latency connectivitybetween master peripherals and slave peripherals. The SCR is thedecoding, routing, and arbitration logic that enables the connectionbetween multiple masters and slaves that are connected to it.

The SoC 800 also includes application-specific hardware logic, on-chipmemory, and additional on-chip peripherals. The peripheral set includes:a configurable video port (Video Port I/F), an Ethernet MAC (EMAC) witha Management Data Input/Output (MDIO) module, a 4-bit transfer/4-bitreceive VLYNQ interface, an inter-integrated circuit (I2C) businterface, multichannel audio serial ports (McASP), general-purposetimers, a watchdog timer, a configurable host port interface (HPI);general-purpose input/output (GPIO) with programmable interrupt/eventgeneration modes, multiplexed with other peripherals, UART interfaceswith modem interface signals, pulse width modulators (PWM), an ATAinterface, a peripheral component interface (PCI), and external memoryinterfaces (EMIFA, DDR2). The video port I/F is a receiver andtransmitter of video data with two input channels and two outputchannels that may be configured for standard definition television(SDTV) video data, high definition television (HDTV) video data, and rawvideo data capture.

As shown in FIG. 8, the SoC 800 includes two high-definitionvideo/imaging coprocessors (HDVICP) and a video data conversion engine(VDCE) to offload many video and image processing tasks from the DSPcore. The VDCE supports video frame resizing, anti-aliasing, chrominancesignal format conversion, edge padding, color blending, etc. The HDVICPcoprocessors are designed to perform computational operations requiredfor video encoding and/or decoding such as motion estimation, motioncompensation, intra-prediction, transformation, inverse transformation,quantization, and inverse quantization. Further, the distinct circuitryin the HDVICP coprocessors that may be used for specific computationoperations is designed to operate in a pipeline fashion under thecontrol of the ARM subsystem and/or the DSP subsystem.

OTHER EMBODIMENTS

While the invention has been described with respect to a limited numberof embodiments, those skilled in the art, having benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the invention as disclosed herein.

For example, in some embodiments, a 1-bit lossless coding indicator canbe signaled at the TU level instead of CU level. Also, in someembodiments, instead of having an explicit lossless coding indicator fora TU or a CU, a selected QP value associated with a CU or a TU can beused for lossless coding signaling when lossless coding is enabled at ahigher level.

Embodiments of the methods, encoders, and decoders described herein maybe implemented in hardware, software, firmware, or any combinationthereof. If completely or partially implemented in software, thesoftware may be executed in one or more processors, such as amicroprocessor, application specific integrated circuit (ASIC), fieldprogrammable gate array (FPGA), or digital signal processor (DSP). Thesoftware instructions may be initially stored in a computer-readablemedium and loaded and executed in the processor. In some cases, thesoftware instructions may also be sold in a computer program product,which includes the computer-readable medium and packaging materials forthe computer-readable medium. In some cases, the software instructionsmay be distributed via removable computer readable media, via atransmission path from computer readable media on another digitalsystem, etc. Examples of computer-readable media include non-writablestorage media such as read-only memory devices, writable storage mediasuch as disks, flash memory, memory, or a combination thereof.

Although method steps may be presented and described herein in asequential fashion, one or more of the steps shown in the figures anddescribed herein may be performed concurrently, may be combined, and/ormay be performed in a different order than the order shown in thefigures and/or described herein. Accordingly, embodiments should not beconsidered limited to the specific ordering of steps shown in thefigures and/or described herein.

It is therefore contemplated that the appended claims will cover anysuch modifications of the embodiments as fall within the true scope ofthe invention.

What is claimed is:
 1. A method, comprising: receiving a compressed bitstream comprising a picture, the picture comprising a coding unit andthe coding unit comprising a region; decoding, in a picture parameterset syntax of the compressed bitstream, a transform bypass enabled flag;following the decoding of the transform bypass enabled flag, decoding atransform bypass flag for the region in the compressed bitstream whenthe transform bypass enabled flag is set to indicate that the transformbypass flag is present; and bypassing a transform process for the regionwhen the transform bypass flag is set to indicate that the transformprocess for the region is bypassed.
 2. The method of claim 1, furthercomprising decoding a transform-and-quantization bypass flag for thecoding unit.
 3. The method of claim 1, wherein the transform bypass flagis associated with the region.
 4. The method of claim 1, wherein thetransform bypass enabled flag is a 1-bit flag and the transform bypassflag is a 1-bit flag.
 5. The method of claim 4, wherein: the transformbypass enabled flag is set to indicate that the transform bypass flag ispresent comprises the transform bypass enabled flag is set to a binaryvalue of 1; and the transform bypass flag is set to indicate that thetransform process for the region is bypassed comprises the transformbypass flag is set to a binary value of
 1. 6. A system, comprising: areceiver configured to receive a compressed bit stream comprising apicture, the picture comprising a coding unit; a video decoder coupledto the receiver and configured to: decode, in a picture parameter setsyntax of the compressed bitstream, a transform bypass enabled flag;following the decoding of the transform bypass enabled flag, decode atransform bypass flag for the region in the compressed bitstream whenthe transform bypass enabled flag is set to indicate that the transformbypass flag is present; and bypass a transform process for the regionwhen the transform bypass flag is set to indicate that the transformprocess for the region is bypassed.
 7. The system of claim 6, whereinthe video decoder is configured to decode a transform-and-quantizationbypass flag for the coding unit.
 8. The system of claim 6, wherein thetransform bypass flag is associated with the region.
 9. The system ofclaim 6, wherein the transform bypass enabled flag is a 1-bit flag andthe transform bypass flag is a 1-bit flag.
 10. The system of claim 9,wherein: the transform bypass enabled flag is set to indicate that thetransform bypass flag is present comprises the transform bypass enabledflag is set to a binary value of 1; and the transform bypass flag is setto indicate that the transform process for the region is bypassedcomprises the transform bypass flag is set to a binary value of
 1. 11. Asystem, comprising: a receiver configured to receive a compressed bitstream comprising a picture, the picture comprising a coding unit; avideo decoder coupled to the receiver and configured to: decode, in apicture parameter set syntax of the compressed bitstream, a transformbypass enabled flag; following the decoding of the transform bypassenabled flag, decode a transform bypass flag for the region in thecompressed bitstream when the transform bypass enabled flag is set toindicate that the transform bypass flag is present; and bypass atransform process for the region when the transform bypass flag is setto indicate that the transform process for the region is bypassed. 12.The system of claim 11, wherein the video decoder is configured todecode a transform-and-quantization bypass flag for the coding unit. 13.The system of claim 11, wherein the transform bypass flag is associatedwith the region.
 14. The system of claim 11, wherein the transformbypass enabled flag is a 1-bit flag and the transform bypass flag is a1-bit flag.
 15. The system of claim 14, wherein: the transform bypassenabled flag is set to indicate that the transform bypass flag ispresent comprises the transform bypass enabled flag is set to a binaryvalue of 1; and the transform bypass flag is set to indicate that thetransform process for the region is bypassed comprises the transformbypass flag is set to a binary value of 1.